package com.example.superjson.view;

import java.io.IOException;
import java.util.List;

import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
 
import android.content.Context;
import android.os.AsyncTask;
import android.util.Log;
import android.view.LayoutInflater;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.superjson.R;
import com.example.superjson.util.HTTPUtil;
import com.example.superjson.util.JavaToJson;


public class LinearInsView extends FrameLayout {

	private Context context;
	private TextView textView_insname;
	private InstrumentView instrumentView;
//	private Typeface tf;
	private static final String TAG = "LinearInsView";
	public LinearInsView(Context context) {
		super(context);
//		LinearLayout.LayoutParams p = new LinearLayout.LayoutParams(      
//                LinearLayout.LayoutParams.MATCH_PARENT,      
//                LinearLayout.LayoutParams.MATCH_PARENT      
//        );      
//		this.setLayoutParams(p);
		LayoutInflater.from(context).inflate(R.layout.instrusment_view, this);
		textView_insname = (TextView)findViewById(R.id.textView_insname);
		instrumentView = (InstrumentView)findViewById(R.id.instrumentView);
	}
	
	public void setInsname(String name){
		textView_insname.setText(name);
	}
	public void setValue(float value){
		Log.i(TAG, "value:"+(int)(value*180/100));
		instrumentView.setBigDialDegrees((int)(value*180/100));
	}
	
}
